package com.sigmatrix.h5.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sigmatrix.h5.dao.AdminAreaDao;
import com.sigmatrix.h5.entity.AdminArea;
import com.sigmatrix.sc.jdbc.common.dao.DaoImpl;

/**
 * 
 *@ClassName: AdminAreaDaoImpl
 *@Description: 行政区划
 *@author MH
 *@date 2017年9月25日 下午1:24:25
 */
@Repository
public class AdminAreaDaoImpl extends DaoImpl<AdminArea,Integer> implements AdminAreaDao{

	@Override
	public List<AdminArea> findByIds(Object... ids) {
		StringBuffer sql = new StringBuffer();
		sql.append("select * from ").append(tableName());
		sql.append(" where _id in(");
		for (int i = 0; i < ids.length; i++) {
			sql.append("?,");
		}
		sql.replace(sql.length()-1, sql.length(), ")");
		return query(sql.toString(), ids);
	}

}
